package demo;

import demo.controller.UserController;
import demo.controller.UserController2;
import demo.enity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        UserController controller = context.getBean("userController", UserController.class);
        controller.printUser();
        UserController2 controller2 = context.getBean("userController2", UserController2.class);
        controller2.printUser2();
    }
}
